<!DOCTYPE html>
<html>
<head>
   @include("/include/_header.html", {'title':'用户管理'}){}
</head>
<body>


  <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
  	<input type="hidden" name="id" value="${user.id!}">
  	<div class="layui-form-item">
      <label class="layui-form-label">用户编号</label>
      <div class="layui-input-inline">
        <input type="text" name="userNo" lay-verify="required" placeholder="请输入用户编号" autocomplete="off" class="layui-input" value="${user.userNo!}">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">用户名</label>
      <div class="layui-input-inline">
        <input type="text" name="userName" lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input" value="${user.userName!}">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">姓名</label>
      <div class="layui-input-inline">
        <input type="text" name="realName" lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input" value="${user.realName!}">
      </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-inline">
        	@if(isNotEmpty(user.status) && "0" == user.status){
        		<input type="checkbox" name="status" lay-skin="switch" lay-filter="status-switch" lay-text="正常|禁用">
        	@}else {
        		<input type="checkbox" checked="checked" name="status" lay-skin="switch" lay-filter="status-switch" lay-text="正常|禁用">
        	@}
          
        </div>
    </div>
    <div class="layui-form-item">
    	<div class="layui-row">
    		<div class="layui-col-xs8">
    			<label class="layui-form-label">所属部门</label>
			      <div class="layui-input-block">
			        <input type="text" name="deptName" id="deptName" placeholder="请选择所属部门" autocomplete="off" class="layui-input" value="${deptName!}">
			        <input type="hidden" name="deptId" id="deptId" value=${user.deptId!}>
			      </div>
    		</div>
    		<div class="layui-col-xs4">
				<button class="layui-btn layui-btn-sm" style="margin-top: 5px;" id="selectDept">请选择</button>
			</div>
			 @include("/component/_select_dept.html", {'domId':'selectDept', 'inputName':'deptName', 'inputId':'deptId'}){}
    	</div>	
    </div>
    <div class="layui-form-item">
    	<div class="layui-row">
    		<div class="layui-col-xs8">
    			<label class="layui-form-label">所属角色</label>
			      <div class="layui-input-block">
			        <input type="text" name="roleNames" id="roleNames" placeholder="请选择所属角色" autocomplete="off" class="layui-input" value="${roleNames!}">
			        <input type="hidden" name="roleIds" id="roleIds" value=${roleIds!}>
			      </div>
    		</div>
    		<div class="layui-col-xs4">
				<button class="layui-btn layui-btn-sm" style="margin-top: 5px;" id="selectRoles">请选择</button>
			</div>
			 @include("/component/_select_roles.html", {'domId':'selectRoles', 'inputName':'roleNames', 'inputId':'roleIds'}){}
    	</div>	
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">手机号</label>
      <div class="layui-input-inline">
        <input type="text" name="telNo" lay-verify="required|phone" placeholder="请输入手机号" autocomplete="off" class="layui-input" value="${user.telNo!}">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">邮箱</label>
      <div class="layui-input-inline">
        <input type="text" name="email" lay-verify="email" placeholder="请输入邮箱" autocomplete="off" class="layui-input" value="${user.email!}">
      </div>
    </div>
    <div class="layui-form-item">
	    <label class="layui-form-label">性别</label>
	    <div class="layui-input-inline">
	    	@if(isEmpty(user)) {
	    		<t:radio dicCode="common_sex" defaultValue="0" name="sex"></t:radio>
	    	@}else {
	    		<t:radio dicCode="common_sex" defaultValue="${user.sex!}" name="sex"></t:radio>
	    	@}
	    </div>
	  </div>
    <div class="layui-form-item">
      <label class="layui-form-label">备注</label>
      <div class="layui-input-inline">
        <textarea name="memo" style="width: 400px; height: 100px;" autocomplete="off" class="layui-textarea">${user.memo!}</textarea>
      </div>
    </div>
    
	<div class="layui-form-item layui-hide">
      <input type="button" lay-submit lay-filter="form-btn-save" id="form-btn-save" value="保存">
      <input type="button" lay-submit lay-filter="form-btn-cancel" id="form-btn-cancel" value="取消">
    </div>
  </div>
 
 
  @include("/include/_container.html", {'js':'/assets/sys/user/user.js'}){}
</body>
</html>